<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Admin</title>
<script src="http://www.google.com/jsapi"></script>
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="references/js/chartkick.js"></script>

<style>

</style>
</head>
<body>
	<tiles:insertTemplate template="/pages/masterpage/masterPage.jsp">
		<tiles:putAttribute name="body">
			<logic:notEqual name="role" value="Administrator">
				<logic:forward name="home" />
			</logic:notEqual>
			<html:link action="/viewAllTransaction"
				styleClass="btn btn-danger" style=" margin-top: 5px;">
															View Transaction</html:link>
			<html:link action="/viewAllUser" styleClass="btn btn-warning"
				style=" margin-top: 5px;">
															View All User</html:link>

			<h1>Total Transaction</h1>
			<div id="chart-1" style="height: 300px;"></div>
			<script>
			 new Chartkick.LineChart("chart-1", [{name: "Buy App", data: [	${buyApp }]}, {name: "Deposit", data: [	${deposit }]},{name: "Request Money", data: [${requestMoney }]}], {"discrete": true});
			</script>
			
			<h1>Total Upload</h1>
			<div id="chart-201" style="height: 300px;"></div>
			<script>
      new Chartkick.LineChart("chart-201", [${totalUpload}], {"discrete": true});
    </script>
    
    <h1>Total Download</h1>
			<div id="chart-202" style="height: 300px;"></div>
			<script>
      new Chartkick.LineChart("chart-202", [${totalDownload}], {"discrete": true});
    </script>

		</tiles:putAttribute>
	</tiles:insertTemplate>
</body>
</html>